-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.9][build] Make sure SPM is built with the forked clang, not the host clang #67249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@kateinoigakukun, would you run the CI on this? |
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’re going to revert the original as it’s broken the SwiftPM option on build-script.
This has been reapplied to trunk. @bnbarham, please run the CI on this again. |
It's already passed, but I can run again since swiftlang/swift-package-manager#6729 may have caused changes. |
@swift-ci please test |
@al45tair, please remove the request whenever you think this is safe to go in. If there are no further problems on trunk, do you think we can get this into 5.8 also? We'd probably need to get your SPM change in there too. |
5.9 should be good to go in now. |
@etcwilde, ready for merge. |
@tomerd, ready to go. |
Cherrypick of #64629
Explanation: SPM was built with the freshly-built Swift toolchain, including the Swift-forked clang, for years, but a change in swiftlang/swift-package-manager#5894 late last year inadvertently switched it to be built with the system clang used to natively build the Swift compiler, ie
self.toolchain.cc
inbuild-script
. That passed the CI but caused problems when cross-compiling SPM on my daily Android CI, as the system clang is only meant for native compilation- for example, we use the freshly-built Swift-forked clang for the native host by default when cross-compiling the Swift compiler itself- so I've been using this patch for the last seven months on my Android CI.Scope: Only affects the C/C++/asm files built as part of SwiftPM, particularly when cross-compiled
Issue: None
Risk: low, as this only affects compilation of non-Swift portions of SPM itself
Testing: Passed all CI on trunk and I've been using this on my Android CI since last year
Reviewer: @etcwilde